window.onload=function(){
    var iScoll=0;
    var moveX=0;
    var b=true;
   var oListInfo=document.getElementsByClassName("listInfo");
    for(var i=0;i<oListInfo.length;i++){
  oListInfo[i].addEventListener("touchstart",function(event){
        /*event.preventDefault();*/
	  if (event.target.tagName != 'INPUT') {
			event.preventDefault();
		}
        iScoll=event.changedTouches[0].pageX;
  })
  oListInfo[i].addEventListener("touchmove",function(event){
    b=false;
   /* event.preventDefault();*/
    if (event.target.tagName != 'INPUT') {
		event.preventDefault();
	}
      moveX=event.changedTouches[0].pageX-iScoll;
      if(moveX>0){
          this.style.WebkitTransform = "translateX(" + 0 + "px)";
      }
      else if(moveX<0){
        var l=Math.abs(moveX)
        this.style.WebkitTransform = "translateX(" + -l + "px)";
        if(l>120){
          l=120;
          this.style.WebkitTransform = "translateX(" + -l + "px)";
        }
      }
      
  })

 oListInfo[i].addEventListener("touchend",function(event){
    moveX=event.changedTouches[0].pageX-iScoll;
    if(moveX==0 && b){
    	$('.ourl').on('touchend',function(){
    		window.location.href=this.href;
    	});
        /*window.location.href="http://www.baidu.com";*/
        return;
      }
          
    if(moveX>-60){
      var l=0;
      this.style.WebkitTransform = "translateX(" + -l + "px)";
    }
    else{
      l=120;
      this.style.WebkitTransform = "translateX(" + -l + "px)";
    }
  })
}
}